package com.chixing.day18_thread;

public class Producer implements Runnable{
    private PublicResource publicResource;

    public Producer(PublicResource publicResource) {
        this.publicResource = publicResource;
    }



    //负责生产
    @Override
    public void run() {
        while (true) {
            publicResource.producer();
        }
    }
}
